package com.hzqy.persistence.dao.publicize;


import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.CmContentVo;
import com.hzqy.web.vo.CmUserOrgVo;
import com.hzqy.web.vo.PmsOrgVo;

@Repository
public class PublicizeDao extends PersistenceDao<CmContentVo, Integer>{
	protected final Logger LOG = LoggerFactory.getLogger(getClass());

	public int findUserOrgCount(CmUserOrgVo cmUserOrgVo) {
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "findUserOrgCount", cmUserOrgVo);
	}
	
	public List<CmUserOrgVo> selectUserOrgList(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectUserOrgList", map);
	}
	
	public int insertUserOrg(CmUserOrgVo cmUserOrgVo){
		String namespace = this.getNamespace();
		return getSqlSession().insert(namespace + "insertUserOrg", cmUserOrgVo);
	}
	
	public int deleteUserOrg(int f_cuo_id){
		String namespace = this.getNamespace();
		return getSqlSession().delete(namespace + "deleteUserOrg", f_cuo_id);
	}
	
	public List<PmsOrgVo> selectOrgByCoordinateCount(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectOrgByCoordinateCount", map);
	}
	
	public List<PmsOrgVo> selectOrgByCoordinate(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectOrgByCoordinate", map);
	}
	
	public List<CmContentVo> selectContentListByOrgId(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectContentListByOrgId", map);
	}
	
	public List<CmContentVo> selectContentListByName(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectContentListByName", map);
	}
	
	public int selectContributeOrgListCount(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectOne(namespace + "selectContributeOrgListCount", map);
	}
	
	public List<CmUserOrgVo> selectOrgByOrgids(Map<String,Object> map){
		String namespace = this.getNamespace();
		return getSqlSession().selectList(namespace + "selectOrgByOrgids", map);
	}
	
}
